package memo.action;

import model.pojo.Employee;
import android.app.Activity;
import android.os.Bundle;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import approve.action.R;

public class Memo_addnew extends Activity {
	TextView tvtitle,tvcontent;
	EditText ettitle,etcontent;
	Button btsave, btreset, btbackmemolist;
	
	String lang = "EN",database;
	Bundle language;
	Employee emp= new Employee();
	public String getDatabase() {
		Bundle extras = getIntent().getExtras();
		if (extras != null) {
			database = extras.getString("database");
		}
		return database;
	}
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.memo_addnew);
		language = getIntent().getExtras().getBundle(getLang());
		initmember();
	}

	private void initmember(){
		tvtitle=(TextView)findViewById(R.id.memo_add_tvtitle);
		tvcontent=(TextView)findViewById(R.id.memo_add_tvcontent);
		ettitle=(EditText)findViewById(R.id.memo_add_ettitle);
		etcontent=(EditText)findViewById(R.id.memo_add_etcontent);
		btsave=(Button)findViewById(R.id.memo_add_btsave);
		btreset=(Button)findViewById(R.id.memo_add_btreset);
		btbackmemolist=(Button)findViewById(R.id.memo_add_btbackmemolist);
		tvtitle.setText(language.getString("title"));
		tvcontent.setText(language.getString("content"));
		btsave.setText(language.getString("save"));
		btbackmemolist.setText(language.getString("ac_back"));
		btreset.setText(language.getString("ac_ma_Reset"));
	}
	
	public String getLang() {
		Bundle extras = getIntent().getExtras();
		if (extras != null) {
			lang = extras.getString("lang");
		}
		return lang;
	}
}
